package org.offsync.rich

import org.offsync.util.AutoDisposed
import org.offsync.util.Disposable
import org.offsync.util.DisposeState
import org.offsync.util.Time

case class RichCloseable[C <: { def close(): Unit }](val closeable: C) extends Disposable {
  override def disposeState = DisposeState.Unknown
  
  override def dispose(): Unit = closeable.close()
  
  override def waitDisposed(
      deadline: Time): Unit = { }

  def asDisposable = this
}
